//
//  MVCollectionViewCell.m
//  23_QQ音乐
//
//  Created by 徐昊 on 16/8/15.
//  Copyright © 2016年 徐昊. All rights reserved.
//

#import "MVCollectionViewCell.h"
#import "MVConllectionList.h"
#import "UIImageView+WebCache.h"

@interface MVCollectionViewCell ()
@property (weak, nonatomic) IBOutlet UIImageView *imagePic;
@property (weak, nonatomic) IBOutlet UILabel *descLabel;
@property (weak, nonatomic) IBOutlet UILabel *songName;

@end

@implementation MVCollectionViewCell

- (void)setMvCollectionList:(MVConllectionList *)mvCollectionList {
    _mvCollectionList = mvCollectionList;
    NSString *songAndSinger = [mvCollectionList.mvtitle stringByAppendingFormat:@" - %@", mvCollectionList.singername];
    _songName.text = songAndSinger;
    _descLabel.text = mvCollectionList.mvdesc;
    if (mvCollectionList.picurl.length != 0) {
        [_imagePic sd_setImageWithURL:[NSURL URLWithString:mvCollectionList.picurl]];
    } else {
        NSString *imageUrl = [NSString stringWithFormat:@"http://shp.qpic.cn/qqvideo_ori/0/%@_360_204/0?max_age=259200", mvCollectionList.vid];
        [_imagePic sd_setImageWithURL:[NSURL URLWithString:imageUrl]];
    }
}


@end
